package org.bookshare.validator.rule;

import java.io.IOException;

import org.apache.commons.lang.ArrayUtils;
import org.benetech.event.EventListener;
import org.bookshare.document.beans.DocumentComponent;
import org.bookshare.document.beans.DocumentSet;
import org.bookshare.validator.report.ValidationMetadata;

public class NCXAndSMILExistRule implements Rule {

	public void evaluate(ValidationMetadata validationMetadata, EventListener listener) throws IOException {
		DocumentSet ds = validationMetadata.getDocumentSet();
		if (ArrayUtils.contains(ds.getType().getComponents(), DocumentComponent.NCX)) {
			if (ds.getFile(DocumentComponent.NCX) == null) {
				// TODO
			}
			if (ds.getFile(DocumentComponent.SMIL) == null) {
				// TODO
			}
		}

	}

}
